package com.gbx.ximalayating.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.util.Log;

import com.gbx.ximalayating.entity.RecommendOne;
import com.gbx.ximalayating.fragment.FocusImagesFragment;

import java.util.List;

/**
 * Created by Administrator on 2016/12/8.
 */

public class FocusImageAdapter extends FragmentPagerAdapter {
    private List<RecommendOne.FocusImages.ConEntity> list;

    public FocusImageAdapter(FragmentManager fm,List<RecommendOne.FocusImages.ConEntity> list) {
        super(fm);
        this.list = list;
    }

    @Override
    public Fragment getItem(int position) {
        Log.e("1621",list.get(position).getPic());
        return FocusImagesFragment.getInstance(list.get(position).getPic());
    }

    @Override
    public int getCount() {
        return list.size();
    }
}
